package com.icesoft.xsnow.common.security.annotation;

import com.icesoft.xsnow.common.security.config.XsnowResourceServerConfiguration;
import org.springframework.context.annotation.Import;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;

import java.lang.annotation.*;

/**
 * @author xuefeng.gao
 * @date 2019/4/10
 * <p>
 * 资源服务注解
 * 1. 增强token covert
 * 2. 增加feign 拦截, 传递token
 */
@Documented
@Inherited
@EnableResourceServer
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@EnableGlobalMethodSecurity(prePostEnabled = true,securedEnabled = true,jsr250Enabled = true)
@Import({ XsnowResourceServerConfiguration.class})
public @interface EnableXsnowResourceServer {
}
